<script setup>
import { defineProps } from 'vue'
defineProps({
  goodsList: {
    type: Object,
    default: () => {}
  }
})
</script>
<template>
    <!-- 面包屑 -->
    <bread v-if="goodsList.categories" separator=">">
        <breadItem to="/">首页</breadItem>
        <breadItem :to="`/category/${goodsList.categories[1].id}`">{{ goodsList.categories[1].name }}</breadItem>
        <breadItem :to="`/category/sub/${goodsList.categories[0].id}`">{{goodsList.categories[0].name  }}</breadItem>
        <breadItem :to="`/goods/${goodsList.id}`">{{goodsList.name }}</breadItem>
      </bread>
</template>
